package com.sanjiahantang.youjiarole.module.me.order.beans;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sanjiahantang.youjiarole.base.BaseBean;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by zy on 2017/11/8.
 */

public class Service3PartBean extends BaseBean {

    private String data;

    public Data getData() {
        return new Gson().fromJson(data,Data.class);
    }

    public void setData(String data) {
        this.data = data;
    }

    public static class Data{


        private String createTime;
        private String customerFaPhone;
        private int oiId;
        private String orderCode;
        private String payTemplateName;
        private int userRequireId;
        private List<OrderServiceRaDtoListBean> orderServiceRaDtoList;

        public static Data objectFromData(String str) {

            return new Gson().fromJson(str, Data.class);
        }

        public static Data objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), Data.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<Data> arrayDataFromData(String str) {

            Type listType = new TypeToken<ArrayList<Data>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<Data> arrayDataFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<Data>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getCustomerFaPhone() {
            return customerFaPhone;
        }

        public void setCustomerFaPhone(String customerFaPhone) {
            this.customerFaPhone = customerFaPhone;
        }

        public int getOiId() {
            return oiId;
        }

        public void setOiId(int oiId) {
            this.oiId = oiId;
        }

        public String getOrderCode() {
            return orderCode;
        }

        public void setOrderCode(String orderCode) {
            this.orderCode = orderCode;
        }

        public String getPayTemplateName() {
            return payTemplateName;
        }

        public void setPayTemplateName(String payTemplateName) {
            this.payTemplateName = payTemplateName;
        }

        public int getUserRequireId() {
            return userRequireId;
        }

        public void setUserRequireId(int userRequireId) {
            this.userRequireId = userRequireId;
        }

        public List<OrderServiceRaDtoListBean> getOrderServiceRaDtoList() {
            return orderServiceRaDtoList;
        }

        public void setOrderServiceRaDtoList(List<OrderServiceRaDtoListBean> orderServiceRaDtoList) {
            this.orderServiceRaDtoList = orderServiceRaDtoList;
        }

        public static class OrderServiceRaDtoListBean {
            private String createTime;
            private int oiFaId;
            private String orderCode;
            private int osraId;
            private float payMoney;
            private float payResult;
            private int serviceType;
            private int statusId;
            private String statusName;
            private List<ServiceRecordListBean> serviceRecordList;
            private int phoneTypeId;
            private String token;
            private CreateOrderPost.OrderInvoiceInfoDtoBean orderInvoiceInfoDto;

            public CreateOrderPost.OrderInvoiceInfoDtoBean getOrderInvoiceInfoDto() {
                return orderInvoiceInfoDto;
            }

            public void setOrderInvoiceInfoDto(CreateOrderPost.OrderInvoiceInfoDtoBean orderInvoiceInfoDto) {
                this.orderInvoiceInfoDto = orderInvoiceInfoDto;
            }

            public int getPhoneTypeId() {
                return phoneTypeId;
            }

            public void setPhoneTypeId(int phoneTypeId) {
                this.phoneTypeId = phoneTypeId;
            }

            public String getToken() {
                return token;
            }

            public void setToken(String token) {
                this.token = token;
            }

            public static OrderServiceRaDtoListBean objectFromData(String str) {

                return new Gson().fromJson(str, OrderServiceRaDtoListBean.class);
            }

            public static OrderServiceRaDtoListBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), OrderServiceRaDtoListBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<OrderServiceRaDtoListBean> arrayOrderServiceRaDtoListBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<OrderServiceRaDtoListBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<OrderServiceRaDtoListBean> arrayOrderServiceRaDtoListBeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<OrderServiceRaDtoListBean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public String getCreateTime() {
                return createTime;
            }

            public void setCreateTime(String createTime) {
                this.createTime = createTime;
            }

            public int getOiFaId() {
                return oiFaId;
            }

            public void setOiFaId(int oiFaId) {
                this.oiFaId = oiFaId;
            }

            public String getOrderCode() {
                return orderCode;
            }

            public void setOrderCode(String orderCode) {
                this.orderCode = orderCode;
            }

            public int getOsraId() {
                return osraId;
            }

            public void setOsraId(int osraId) {
                this.osraId = osraId;
            }

            public float getPayMoney() {
                return payMoney;
            }

            public void setPayMoney(float payMoney) {
                this.payMoney = payMoney;
            }

            public float getPayResult() {
                return payResult;
            }

            public void setPayResult(float payResult) {
                this.payResult = payResult;
            }

            public int getServiceType() {
                return serviceType;
            }

            public void setServiceType(int serviceType) {
                this.serviceType = serviceType;
            }

            public int getStatusId() {
                return statusId;
            }

            public void setStatusId(int statusId) {
                this.statusId = statusId;
            }

            public String getStatusName() {
                return statusName;
            }

            public void setStatusName(String statusName) {
                this.statusName = statusName;
            }

            public List<ServiceRecordListBean> getServiceRecordList() {
                return serviceRecordList;
            }

            public void setServiceRecordList(List<ServiceRecordListBean> serviceRecordList) {
                this.serviceRecordList = serviceRecordList;
            }

            public static class ServiceRecordListBean {
                private int count;
                private String orderRecordCode;
                private String osrRaId;
                private int osraFaId;
                private int payCount;
                private float payResult;
                private int payTemplateCount;
                private float price;
                private float result;
                private String serviceName;
                private long skuFaId;
                private int statusId;
                private String statusName;
                private int mgiId;
                private int orderTypeId;
                private int planOrderState;

                public int getPlanOrderState() {
                    return planOrderState;
                }

                public void setPlanOrderState(int planOrderState) {
                    this.planOrderState = planOrderState;
                }

                public int getOrderTypeId() {
                    return orderTypeId;
                }

                public void setOrderTypeId(int orderTypeId) {
                    this.orderTypeId = orderTypeId;
                }

                public int getMgiId() {
                    return mgiId;
                }

                public void setMgiId(int mgiId) {
                    this.mgiId = mgiId;
                }

                public static ServiceRecordListBean objectFromData(String str) {

                    return new Gson().fromJson(str, ServiceRecordListBean.class);
                }

                public static ServiceRecordListBean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), ServiceRecordListBean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<ServiceRecordListBean> arrayServiceRecordListBeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<ServiceRecordListBean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<ServiceRecordListBean> arrayServiceRecordListBeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<ServiceRecordListBean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public int getCount() {
                    return count;
                }

                public void setCount(int count) {
                    this.count = count;
                }

                public String getOrderRecordCode() {
                    return orderRecordCode;
                }

                public void setOrderRecordCode(String orderRecordCode) {
                    this.orderRecordCode = orderRecordCode;
                }

                public String getOsrRaId() {
                    return osrRaId;
                }

                public void setOsrRaId(String osrRaId) {
                    this.osrRaId = osrRaId;
                }

                public int getOsraFaId() {
                    return osraFaId;
                }

                public void setOsraFaId(int osraFaId) {
                    this.osraFaId = osraFaId;
                }

                public int getPayCount() {
                    return payCount;
                }

                public void setPayCount(int payCount) {
                    this.payCount = payCount;
                }



                public int getPayTemplateCount() {
                    return payTemplateCount;
                }

                public void setPayTemplateCount(int payTemplateCount) {
                    this.payTemplateCount = payTemplateCount;
                }

                public float getPrice() {
                    return price;
                }

                public void setPrice(float price) {
                    this.price = price;
                }

                public float getResult() {
                    return result;
                }

                public void setResult(float result) {
                    this.result = result;
                }

                public String getServiceName() {
                    return serviceName;
                }

                public void setServiceName(String serviceName) {
                    this.serviceName = serviceName;
                }

                public long getSkuFaId() {
                    return skuFaId;
                }

                public void setSkuFaId(long skuFaId) {
                    this.skuFaId = skuFaId;
                }

                public int getStatusId() {
                    return statusId;
                }

                public void setStatusId(int statusId) {
                    this.statusId = statusId;
                }

                public String getStatusName() {
                    return statusName;
                }

                public void setStatusName(String statusName) {
                    this.statusName = statusName;
                }
            }
        }
    }
}
